| Einhugur Xml Plugin for Xojo |
|
XPathQuery.EvaluateNumber Method
Evaluates query to a Number result.
Parameters
- node
- The node to run the XPath query on.
Returns
- Double
- Numeric result.
Remarks
Note that XPath queries can throw EinhugurXPathException.
var f as FolderItem = SpecialFolder.Resources.Child("xgconsole.xml")
if not f.Exists then
MessageBox("Could not find file xgconsole.xml")
return
end if
using EinhugurXml
try
var document as Document = Document.FromFile(f)
var queryTimeouts as XPathQuery = new XPathQuery("sum(//Tool/@Timeout)")
var sum as Double = queryTimeouts.EvaluateNumber(document)
MessageBox("Sum of timeout's is: " + sum.ToString())
catch ex as EinhugurXmlParserException
MessageBox(ex.Message + " - Offset:" + ex.Offset.ToString())
catch ex as EinhugurXPathException
MessageBox(ex.Message + " - Offset:" + ex.Offset.ToString())
end try
See Also
XPathQuery Class